package com.ruoyi.common.constant;

/**
 * 通用常量信息
 *
 * @author ruoyi
 */
public class Constants
{
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 2;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 用户ID
     */
    public static final String JWT_USERID = "userid";

    /**
     * 用户名称
     */
    public static final String JWT_USERNAME = "sub";

    /**
     * 用户头像
     */
    public static final String JWT_AVATAR = "avatar";

    /**
     * 创建时间
     */
    public static final String JWT_CREATED = "created";

    /**
     * 用户权限
     */
    public static final String JWT_AUTHORITIES = "authorities";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";
    /**
     * 参数管理 cache key
     */
    public static final String DD_CONFIG_KEY = "dd_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    public static Boolean DDSWITCH = false;

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    public final static String HOST="https://oapi.dingtalk.com";
    //获取token的url
    public final static String URL_GETTOKEN=HOST+"/gettoken";
    //获取ticket
    public final static String URL_GETJSAPITICKET=HOST+"/get_jsapi_ticket";
    //查询活跃用户URL
    public final static String URL_GETINACTIVEUSER=HOST+"/topapi/inactive/user/get";
    //获取待我审批数量
    public final static String URL_GETTONUM=HOST+"/topapi/process/gettodonum";
    //根据用户ID查询可见审批列表
    public final static String URL_LISTBYUSERID=HOST+"/topapi/process/listbyuserid";
    //创建审批
    public final static String URL_CREATEPROCESS=HOST+"/topapi/processinstance/create";
    //分页获取审批实例id
    public final static String URL_GETLISTIDS=HOST+"/topapi/processinstance/listids";
    //获取所有部门接口
    public final static String URL_GETALLDEPARTMENTS=HOST+"/department/list";
    //获取单个部门
    public final static String URL_GETONEDEPART = HOST+"/department/get";
    //创建部门接口
    public final static String URL_CREATEDEPARTMENT=HOST+"/topapi/v2/department/create";
    //删除部门接口
    public final static String URL_DELETDEPARTMENT=HOST+"/department/delete";
    //创建用户
    public final static String URL_CREATEUSER=HOST+"/user/create";
    //获取用户详情
    public final static String URL_GETUSERDETAILS=HOST+"/topapi/v2/user/get";
    //创建用户
    public final static String URL_GETUSERLIST=HOST+"/topapi/user/listid";
    //获取离职用户详情
    public final static String URL_GETUSERLEAVEORG=HOST+"/topapi/smartwork/hrm/employee/listdimission";
    //删除钉钉用户
    public final static String URL_DELETEUSER=HOST+"/user/delete";
    //根据手机号获取钉钉用户
    public final static String URL_GETUSERBYMOBILE=HOST+"/user/get_by_mobile";
    //更新部门信息
    public final static String URL_UPDATEDEPARTMENT=HOST+"/topapi/v2/department/update";
    //更新用户信息
    public final static String URL_UPDATEUSE=HOST+"/user/update";
    //发送钉钉工作消息通知
    public final static String URL_MESSAGE=HOST+"/topapi/message/corpconversation/asyncsend_v2";
    //获取角色列表信息
    public final static String URL_GETALLROLE=HOST+"/topapi/role/list";
    //创建角色
    public final static String URL_CREATEROLE=HOST+"/role/add_role";
    //修改角色
    public final static String URL_UPDATEROLE=HOST+"/role/update_role";
    //删除角色
    public final static String URL_DELETEROLE=HOST+"/topapi/role/deleterole";
    //获取角色详情
    public final static String URL_GETROLE=HOST+"/topapi/role/getrole";
    //批量增加员工角色
    public final static String URL_ADDROLESFOREMPS=HOST+"/topapi/role/addrolesforemps";
    //批量删除员工角色
    public final static String URL_REMOVEROLESFOREMPS=HOST+"/topapi/role/removerolesforemps";
    //创建角色组
    public final static String URL_CREATEROLEGROUP=HOST+"/role/add_role_group";
    //获取角色组列表
    public final static String URL_GETROLEGROUP=HOST+"/topapi/role/getrolegroup";
}
